The online racing simulator
Searching in All forums
(951 results)
Yisc[NL]
S3 licensed
That's not the right syntax.
It should be like this:

#Syntax: ss mm hh dayofweek dd MM YYYY

Event OnLapperStart()
RegisterScheduleAction( "* 0 * * * * *", Admin_status );
RegisterScheduleAction( "* 1 * * * * *", Admin_status );
RegisterScheduleAction( "* 2 * * * * *", Admin_status );
RegisterScheduleAction( "* 3 * * * * *", Admin_status );
EndEvent

Etc. etc.
Yisc[NL]
S3 licensed
I'm not sure what LFS Lazy does exactly, but for any program that communicates through the Insim protocol, the basis should be to be able to connect to a server, remain the connection and handle certain packets coming from the server or being send to it.
Yisc[NL]
S3 licensed
Yes you can.
You need to use "InstantSpeed" from the current player and then do something when that goes above 60.
Be aware that you need to check the speed every X seconds, since it can change fast, so you need to write some routine that is run every x seconds.
This can be done with a registered action, but you could also use the delay function.
Yisc[NL]
S3 licensed
Quote from Popughini :Hello, you could make a script that put [COP] in the name you activate the siren please!

The nickname of a player can't be changed through the Insim protocol, it's a read-only value.
Yisc[NL]
S3 licensed
Looked at it, scratched my head a few times, had a couple of goes at it, scratched my head a bit more and then came up with the solution.
It turned out that the array was cleared every time a value was added (I used dumpvar(name_of_the_array)) to monitor that.
Adding a simple "". before the $argv was added, solved that issue.

Have a go with this:


CatchEvent OnLapperStart()
GlobalVar $Rule; #Have Set $Rule[1] - $Rule[16]
GlobalVar $CloseServerRulesOne; #ButtonRow 1
GlobalVar $CloseServerRulesTwo; #ButtonRow 2

$CloseServerRulesOne = "&Close";
$CloseServerRulesTwo = "&Close";
EndCatchEvent

Sub SetServerRules($keyflags,$id)
$AP_HT = 52; #Local Var
closeadminpanelother2(); #A close function
openPrivButton( "ServerRulesChangeTitle",70,$AP_HT+10,60,4,4,-1,96, "^2blablahblah %nl%^2WAAAW new line blablabnla!");

FOR($i=1;$i<17;$i=$i+1)
openPrivButton( "ServerRule_".$i,70,$AP_HT+18,55,4,5,-1,96, "^3".$i.". ".$Rule[$i] ); #Line of rule
openPrivTextButton( "ServerRuleSet_".$i,125,$AP_HT+18,5,4,5,16, "^3Set ServerRule","^0Set",60,ServerRuleSet); #Set button
$AP_HT=$AP_HT+4; #Buttonheight + 4

#closing vars
$CloseServerRulesOne = $CloseServerRulesOne . "&ServerRule_".$i;
$CloseServerRulesTwo = $CloseServerRulesTwo . "&ServerRuleSet_".$i;
ENDFOR

openPrivButton( "ServerRulesClose",70,$AP_HT+19,60,5,5,-1,16, "^3OK",AdminPanelOther2); #This doesnt work if you copy this code hahah
EndSub

Sub ServerRuleSet( $id, $argv )
$Rule[ToNum(trim(subStr( $id,14 )))] = "".$argv; #ToNum(trim(subStr( $id,14 ))) = trim first 14 chars and convert it to ToNum()
SetServerRules(0,0);
EndSub

Yisc[NL]
S3 licensed
Quote from RevLeon :Any chance you can give me a hand with it or a starting point? I don't really know much about scripting but I think I can give it a go Big grin

Here's a starting point, which I hacked together tonight.
Save the file in the 'includes' folder of your Lapper and rename it to *.lpr
Also make sure to add it to the file called "AddonsUsed.lpr".
There should be enough comments in the file, to understand what's happening, otherwise feel free to ask any questions.
I haven't made the leaderboard, but that shouldn't be too hard to figure out (hint, read through some other scripts I made, for directions).
Yisc[NL]
S3 licensed
Quote from RevLeon :Is it possible for a script to count your Total driven distance, session distance and a leaderboard for the top 10 or 15. Also if possible when a driver reaches a certain driven distance they get listed into a file or database and tracking their distance stops there.

Yes, that's possible and could be stored into the database and then ofcourse retrieved as well.
StoreValues is what you are looking for here.
Yisc[NL]
S3 licensed
Quote from AymanHilal :"Such care" not sure if you really don't care or being sarcastic.

But i made a post of what you can really do with lapper if you put some effort into it.
Though, if you really don't "care" then why waste your time writing a useless comment?

I don't think that he is the person who needs to know what can be done with Lapper, given the things he already made with and done for Lapper.
You are right that almost anything can be done with Lapper, if you are willing to put the time in.
Good work from what I can judge off the screenshots, but a cruisescript isn't unique of course.
Yisc[NL]
S3 licensed
The reason you can't use "GetCurrentPlayerVar" in de OnDisConnect event is that as soon as the event is fired, the player has already left the server.
So Lapper isn't able to retrieve the value of that player anymore.
It would be better to make a "Logout" button in the HUD which is linked to a sub-routine that saves the value(s) and then disconnects the player.
Yisc[NL]
S3 licensed
What you describe is standard behavior of Logitech wheels.
It needs to do the full rotation in both directions and then you hear a click to set it into operational mode.
Yisc[NL]
S3 licensed
I've fixed an unhandled exception which caused Lapper to crash, instead of just showing an error in the log file.

Filename: GLScript.cs
Line: 1039

Current line: throw;
Should be: throw new GLScriptException("';' needed");
Yisc[NL]
S3 licensed
This should do the trick Smile
Solution was to add a unique message ID and store that in the database (used the same trick in another project).
Yisc[NL]
S3 licensed
Pitboard - V2.11 (information screen about split times, gaps in front and behind you, ect)

Changelog:

- Added option to check on forced tyre change (works in combination with !pwgui)
- Added option to check on forced compound change (works in combination with !pwgui)
- Disabled some debug code
- Corrected a typo in 'Sub OnEndPit_Pitboard'

Pitwindow GUI - V1.05 (small GUI to set Pitwindow(s))

Changelog:

- Added option to set a forced tyre compound change

Change the extension of the file to .lpr and add them to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
Two minor fixes for LFSLapper.lpr

Line 1250

Current line: privMsg( langEngine( "%{main_outpitwindows}%", GetCurrentPlayerVar("NickName"] ) ));
Should be: privMsg( langEngine( "%{main_outpitwindows}%", GetCurrentPlayerVar("NickName") ) );

Line 1255

Current line: privMsg( langEngine( "%{main_pitwork}%", GetCurrentPlayerVar("pitWork") ) );
Should be: privMsg( langEngine( "%{main_pitwork}%", GetCurrentPlayerVar("PitWork") ) );
Yisc[NL]
S3 licensed
Just as a reminder, using X and Y coordinates is okay, but don't forget that it will calculate the shortest possible length between those two coordinates.
The program doesn't know if that route is possible or not, while in fact that route will never be possible, unless you are driving on the parkinglot with no obstacles at all.
Yisc[NL]
S3 licensed
Ah thanks, I haven't seen that particular message as I am not interested in VR my self. But I do agree that it is important to have it working flawless in LFS in order to try and get more people in.
Yisc[NL]
S3 licensed
Am I the only one who's wondering what Scawen has stumbled on, that is making this test-patch stand for so long?
It was supposed to be a quick fix for a crash and a chance to fit in some other small fixes, but since it's taken longer then expected now, I am wondering what's the reason behind that.
Not being critic, just curious Smile
Yisc[NL]
S3 licensed
Quote from RaZMorocco :Demo for years now, i suggest this doesnt actually happen or you'll kill the game just like many famous old racing games that used this technique, not everyone can afford the game nor pay trought the internet so i suggest they add more stuff into the Demo version

I can agree on the part about not beying able to pay through the internet, but I strongly disagree about the part of adding more stuff into the Demo version.
I also like to question the part about not being able to afford the game.
I've seen a lot of demo users, who aren't able/willing to pay for LFS, but are able to rent servers and run their cruise servers (even with cracked LFS versions).
If you can afford to rent a server (which usualy costs money each month), you surely can affort paying for LFS.
So no, there's enough content in the Demo version and while I agree this should be for free to make it playable for everyone, I do think it's a good idea to shutdown the insim protol in the Demo version.
Although that will probably cracked as well, so it might not be worth the effort.
Yisc[NL]
S3 licensed
Great to see a new version of Lapper being released.
I did notice that the file 'trackList.cfg' isn't up-to-date.
So here's the correct file, which you might want to include in a future release.
Yisc[NL]
S3 licensed
As soon as any event within Lapper is triggered, you can use the several variables within that event, to do different things.
You can do that as in your example, but it's even possible to combine variables and do different things.
Yisc[NL]
S3 licensed
According to the documentation, the Insim Version should be in 'packet[8]' I think.

4 bytes, 1 packet each, meaning packet[0,1,2,3]
Then you get word, which is 2 packets, meaning packet[4 and 5]
Then you get another word, which is 2 packets again, meaning packet [6 and 7]
Then you get the byte for InSimVer, meaning packet[8]

*edit*

I've tested this on my end and the message displayed in LFS about the Insim Version, is gone now.
Which means I officialy 'fixed' my first Lapper core issue Omg omg omg
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
I have no experience coding Lapper and I'm currently trying to get the source files running on my computer (with help of a professional programmer).
I did look into the Insim version issue and came to this conclusion:

In the file called 'Insim4.cs" a packet is created named "VER".
When looking at the Insim documentation "Insim.txt" that was the old way to do something with an Insim version number.
It appears that you now have to do that with a packed named "IS_ISI", which isn't used in the entire Lapper project.
Maybe this will put you on the right track to solve that issue.
Yisc[NL]
S3 licensed
Keep going Scawen and know that a lot of people (although "many" have stated here otherwise very often and in a thousand ways) are still appreciating your work or come as new comers to LFS and start enjoying your masterpiece. Thanks for your dedication and work done (also to Eric and Victor for their contributions).
Yisc[NL]
S3 licensed
Your program need to report an Insim version number, so that the Insim protocol knows what version has to be used.
If nothing is reported (like it is now in your program) it will fall back to Insim protocol version 6.
Yisc[NL]
S3 licensed
You haven't specified the Insim version in your application.
It will still work, but without the new things added in Insim version 7.
FGED GREDG RDFGDR GSFDG